package com.doit.day03

/**
 * 和java的一样
 */
object _02_抽象类 {
  def main(args: Array[String]): Unit = {
    val abc: ABC = new ABC {
      override val name: String = "zss"
      override var gender: String = "male"
      override def sayHi(): Unit = println("hi")
    }
  }
}

abstract class ABC(){
  //抽象属性
  val name :String
  //具体的属性
  val age:Int = 18

  var gender:String

  //抽象方法
  def sayHi():Unit
  //具体的方法
  def sayHello()={
    println("hello")
  }

}
